package com.appkubes.mall.admin.application.activity.activity.entity.vo;

import com.appkubes.mall.admin.application.supplier.supplier.entity.vo.SupplierKeyVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author: Lin Jiaming
 * @Date: 2020/3/5 15:07
 * @Description:
 */
@Data
public class ReleaseActivityVO {
    @ApiModelProperty(value = "活动名称")
    private String activityName;

    @ApiModelProperty(value = "活动协议")
    private String activityAgreement;

    @ApiModelProperty(value = "奖励信息")
    private String rewardDescrition;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(value = "关联的商品KEY", required = true)
    private String goodsKey;

    @ApiModelProperty(value = "佣金比例(百分比)")
    private BigDecimal brokerageRate;

    @ApiModelProperty(value = "佣金")
    private BigDecimal brokerageAmount;

    @ApiModelProperty(value = "来源类型：SUPPLIER：供应商活动，CUSTOMER：自营活动", required = true)
    @Pattern(regexp = "SUPPLIER|CUSTOMER", message = "来源类型有误")
    private String sourceTpe;

    @ApiModelProperty(value = "来源KEY", required = true)
    private String sourceKey;
}
